<template>
  <view class="container">
    <!-- 顶部导航栏 -->

    <!-- 列表区域 -->
    <view class="list-section">
      <view
        class="list-item"
        v-for="(item, index) in listItems"
        :key="index"
        @click="$goBack(item.path)"
      >
        <image :class="item.iconClass" :src="item.iconSrc"></image>
        <text class="item-title">{{ item.title }}</text>
        <u-icon name="arrow-right" size="16" color="#C0C3CE"></u-icon>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      listItems: [
        {
          title: "树形结构",
          iconSrc: "/static/icons/person-score.png",
          iconClass: "item-icon",
          path: "./treeQuery",
        },
        {
          title: "电子地图",
          iconSrc: "/static/icons/certification-check.png",
          iconClass: "item-icon",
          path: "./detectionQuery/stationQuery",
        },
        {
          title: "条件查询",
          iconSrc: "/static/icons/certification-check.png",
          iconClass: "item-icon",
          path: "./conditionQuery",
        },
      ],
    };
  },
};
</script>

<style scoped lang="scss">
.container {
  height: 100vh;
  background-color: #f3f6fa;
  width: 100%;
  box-sizing: border-box;
}

/* 列表区域样式 */
.list-section {
  margin-top: 10px;
  background-color: #fff;
  border-radius: 12px;
  padding: 10px;

  .list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
  }

  .list-item:last-child {
    border-bottom: none;
  }

  /* 图标样式 */
  .item-icon {
    width: 24px;
    height: 24px;
  }

  /* 列表项标题样式 */
  .item-title {
    flex: 1;
    margin-left: 10px;
    font-size: 16px;
    color: #0d1444;
    font-weight: 400;
  }
}

/* 右箭头图标样式 */
u-icon {
  margin-left: auto;
}
</style>
